home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / GRAPHICS / MWSTAR.ZIP / STAR.ASM < prev    next >
Encoding:
Assembly Source File  |  1996-09-07  |  822 b   |  39 lines

  1. ;       Matt Wilhelm's Small Starfield
  2.  
  3. .model tiny
  4.  
  5. .code
  6. org 100h
  7.  
  8. start:
  9.         mov     al,13h
  10.         int     10h
  11.  
  12.         mov     bh,0a0h
  13. hidden_ret:
  14.         mov     es,bx
  15.  
  16. ;        dec     ch             ; for many stars
  17. genstar:
  18.         in      al,40h          ; pop ax works (but sucks)
  19.                                 ; inc ax works, and looks nice
  20.                                 ; (but loses randomness)
  21.         aaa
  22.  
  23. scroll:
  24.         sbb     di,ax
  25.         stosb
  26.         loop    genstar
  27.  
  28.         mov     ah,1            ; keycheck
  29.         int     16h
  30.         jnz     hidden_ret + 1
  31.  
  32.         xor     ax,ax           ; CBW works on some systems
  33.  
  34.         xchg    al,es:[di]
  35.         inc     cx
  36.  
  37.         jmp     scroll          ; jmp to scroll - 1 for a different look
  38. end start
  39.